<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;  charset=utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>游戏秀-抓取管理</title>
<link href="/admin/style/user/admin.css" type="text/css" rel="stylesheet" media="screen" />
<script type="text/javascript" src="http://www.sinaimg.cn/cj/dfz/js/base_v_0.1.js" charset="utf-8"></script> 
<style type="text/css">
.rstrt_span{display:inline-block;border:1px solid #ccc;background:#eee;padding:0 15px;line-height:28px;font-size:14px}

.down {background:url(/admin/images/sort_dn.gif) no-repeat right 0;padding-right:18px;}
.up {background:url(/admin/images/sort_up.gif) no-repeat right 0;padding-right:18px;}
.kw{background:#ddd;color:#999;}
</style>
</head>
<body>
	<div class="sec-title">
		<h3 class="title"><a href="#">游戏秀</a><i>&gt;</i>用户管理</h3>
	</div>
	<div style="margin:10px;">
		
		<span class="rstrt_span" {%if $g_show.is_used eq '0'%}style="color:red; font-weight:bold"{%/if%}><a href="?status=1">展示的用户</a></span>
		<span class="rstrt_span" {%if $g_show.is_used eq '1'%}style="color:red; font-weight:bold"{%/if%}><a href="?status=0">删除的用户</a></span>
	</div>
	
	<div style="margin:10px;">
		<form>
			&nbsp;&nbsp;
			&nbsp;&nbsp;
			UID			<input type="text" name="uid"> 性别
			<select name="sex">
			<option value="">全部</option>
			<option value=1>男</option>
			<option value=2>女</option>	
			</select>

站点
			<select name="site_id">
			<option value="">全部</option>
			{%foreach item=item key=key from=$config.site_name%}
			<option value={%$key%}>{%$item%}</option>
			{%/foreach%}
			
			</select>
			分享数>=<input type="text" name="count_mblog" size=5>
			用户等级<input type="text" name="verified_type" size=5>


<!--
			&nbsp;&nbsp;
			风味：
			<select name="RstrtFlavorByType">
				<option value=''>全部</option>
				{%foreach from=$g_show.flavor key=i item=val%}
				<option value={%$i%} {%if $i eq $g_show.args.RstrtFlavorByType%}selected="selected"{%/if%}>{%$val%}</option>
				{%/foreach%}
			</select>
 			&nbsp;&nbsp;
			提交人：
			<select name='admin_id'>
				<option value=-1>全部</option>
				{%foreach from=$g_show.admin_list key=i item=val%}
				<option value={%$val.uid%} {%if $i eq $g_show.args.admin_id%}selected="selected"{%/if%}>{%$val.user_name%}</option>
				{%/foreach%}
			</select> -->
			&nbsp;&nbsp;
			<input type=hidden name='is_used' value={%$g_show.is_used%}></input>
			<input type=submit value="查询"></input>
			
		</form>
		
	</div>
	<div style="margin:10px;">
		
	</div>
	
	<div class="w10">
	<table class="table-list">
		<tr>
		<th>uid</th>
		<th>用户昵称</th>
		<th>性别</th>
		<th>图片</th>
		<th>时间</th>
		<th>级别</th>
		<th>主要话题</th>
		<th>分享数</th>

		<th width=10%>操作</th></tr>
		{%section name=count loop=$g_show.list%}
		<tr class="cur" id="list_tr_{%$g_show.list[count].uid%}">
		<td>
		{%$g_show.list[count].uid%}|{%$g_show.list[count].openid%}
		</td>
		<td>
		<a href="/user/{%$g_show.list[count].uid%}.html" target="_blank">{%$g_show.list[count].user_nickname%}</a>
		</td>
		<td>
		{%if $g_show.list[count].sex ==2%}女{%else%}男{%/if%}
		</td>
		<td>
		<img src="{%$g_show.list[count].head_url%}" style="max-width:120px; max-height=200px">
		</td>
		<td>
		{%$g_show.list[count].update_time%}
		</td>
		<td>
		{%$g_show.list[count].verified_type%}
		</td>
		<td>
		{%$g_show.list[count].site_name%}
		</td>
		<td>
		{%$g_show.list[count].count_mblog%}
		</td>
		<td>
		{%if $g_show.list[count].is_tuijian%}<a href="javascript:void(0);" onclick=tuijian_one({%$g_show.list[count].uid%});>推荐达人</a>{%/if%}
		<a href="javascript:void(0);" onclick=del_one({%$g_show.list[count].uid%});>删除</a>
		</td>

		</tr>
		{%sectionelse%}
		<tr><td colspan="8">
		目前列表中没有内容
		</td></tr>
		{%/section%}
	</table>
	</div>
	<div style="margin:10px;">
		
		<div style="display:inline;">
			{%$g_show.page_bar%}
		</div>
	</div>
	


	<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</body>
<script>

function add_pubu(id)
{
	if(!id)
	{
		alert("没选择？！");
		return false;
	}
	$.post('mblog_cron_content_to_pubu_post.php?id='+id, '', function(data){
		if (data.error == 1)
		{
			alert(data.errmsg);
		}
		else
		{
			$("#list_tr_"+id).hide();
			//alert("操作成功。");
			//window.location.reload();
		}
	}, 'json');
}



function tuijian_one(id)
{
	if(!id)
	{
		alert("没选择？！");
		return false;
	}
	if(!confirm("是否加入到推荐达人，推荐后无法取消！?")){ return false; }

	$.post('usert_tuijian_post.php?type=add&id='+id, '', function(data){
		if (data.error == 1)
		{
			alert(data.errmsg);
		}
		else
		{
		
			window.location.reload();
		}
	}, 'json');
}


function del_one(id)
{
	if(!id)
	{
		alert("没选择？！");
		return false;
	}

	if(!confirm("删除后所有信息都被删除?")){ return false; }

	$.post('mblog_pubu_edit_post.php?type=del_user&id='+id, '', function(data){
		if (data.error == 1)
		{
			alert(data.errmsg);
		}
		else
		{
			$("#list_tr_"+id).hide();
			//alert("操作成功。");
			//window.location.reload();
		}
	}, 'json');
}


//全选
function selece_all(obj)
{
	if($(obj).attr("checked")==true)
		$(".rstrt_item").attr("checked",true);
	else
		$(".rstrt_item").attr("checked",false);
}

//ID组合
function marge_ids()
{
	ids = '';
	$.each($(".rstrt_item"), function(i, n)
	{
		if($(n).attr("checked")==true)
		{
			
			ids += ($(n).val()+',');
		}
	});
	ids = ids.substring(0,ids.length-1);
	return ids;
}

//审核事件
function rstrt_verify(id_type,verify_status)
{
	if(id_type == "mutiple")
		rstrt_ids = marge_ids();
	else
		rstrt_ids = id_type;
	
	if(!rstrt_ids)
	{
		alert("请您先选择专辑。");
		return false;
	}
	$.post('ajax_rstrt_verify_op.php?rstrt_ids='+rstrt_ids+'&verify='+verify_status, '', function(data){
		if (data.error == 1)
		{
			alert(data.errmsg);
		}
		else
		{
			alert("操作成功。");
			window.location.reload();
		}
	}, 'json');
}

//删除事件
function rstrt_delete()
{
	rstrt_ids = marge_ids();

	
	if(!rstrt_ids)
	{
		alert("请您先选择专辑。");
		return false;
	}
	$.post('ajax_rstrt_delete.php?rstrt_ids='+rstrt_ids, '', function(data){
		if (data.error == 1)
		{
			alert(data.errmsg);
		}
		else
		{
			alert("操作成功。");
			window.location.reload();
		}
	}, 'json');
}


function order_resort(data_type,orderby,id_name)
{
	show_class = $("#"+id_name).attr("class")=="up"?"down":"up";

	//重排序数据提交
	self.location = "?is_verify={%$g_show.args.is_verify%}&keyword={%$g_show.args.keyword%}&class={%$g_show.args.class%}&is_recommend={%$g_show.args.is_recommend%}&"+id_name+"="+show_class;

}

//关键词栏状态调整
function keyword_status(obj)
{
	$(obj).attr("class","");
	$(obj).val("");
}

//餐厅合并
function rstrt_merge(id)
{
	rstrt_ids = marge_ids();
	if(!rstrt_ids)
	{
		alert("请您先选择餐厅。");
		return false;
	}
	self.location ="rstrt_merge.php?id="+rstrt_ids;
	//WindowOpen("rstrt_merge.php?id="+rstrt_ids,"240px","200px");
}

</script>
</html>
